package com.cindata

import com.opencsv.CSVReader
import com.opencsv.bean.ColumnPositionMappingStrategy
import com.opencsv.bean.CsvToBean
import com.opencsv.bean.CsvToBeanBuilder;

class AccountCSVImporter extends CSVImpoter
{
    /*******************按照实体将csv对应的列进行排序列出*******************************/
    static columnsSet = [
        [ name: 'name'],
        [ name: 'address'],
        [ name: 'level'],
        [ name: 'parent'],
        [ name: 'phone'],
        [ name: 'province'],
        [ name: 'city'],
        [ name: 'district'],
        [ name: 'contact'],
        [ name: 'cellphone'],
        [ name: 'x'],
        [ name: 'y'],
    ]
    /*******************读取单个单元格数据**********************/

    AccountCSVImporter(){
        columns = columnsSet
        startRow = 3
    }

    @Override
    def read(InputStream inputStream,String charsetName) {
        return super.read(inputStream,charsetName)
    }
}
